﻿using MoviesWeb.DAL;
using MoviesWeb.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MoviesWeb.BLL
{
    public class MoviesBLL
    {
        static MoviesDAL moviesdal = new MoviesDAL();
        public static Movies IdGetMovies(int id)
        {
            return moviesdal.IdGetMovies(id);
        }
        public static bool AddMovie(Movies movice)
        {
            return moviesdal.AddMovie(movice);
        }
        public static bool DeleteMovie(int id)
        {
            return moviesdal.DeleteMovie(id);
        }
        public static bool ChangeMovie(Movies movice)
        {
            return moviesdal.ChangeMovie(movice);
        }
        public static List<Movies> TypeGetMovies(string type)
        {
            return moviesdal.TypeGetMovies(type);
        }
        public static List<Movies> KeyWordGetMovies(String key)
        {
            //名称   类型    一句话简介   详细简介
            if (key == "")
                return moviesdal.GetAllrecord();
            return moviesdal.KeyWordGetMovies(key);
        }
        public static bool Addclick(int id)
        {

            return moviesdal.Addclick(id);
        }
        public static List<Movies> TypeGetMovies(string type, int n)
        {
            return moviesdal.TypeGetMovies(type, n);
        }
        public static bool AlertIntroduce(string a, int id)
        {
            return moviesdal.AlertIntroduce(a, id);
        }
    }
}
